package com.primus.server.entity.user;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.primus.server.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import java.util.List;

@Entity
@Getter
@Setter
public class Role extends BaseEntity {

    private String name;

    private String code;

    @ManyToMany(fetch = FetchType.LAZY)
    @JsonIgnore
    private List<Authority> authorities;
}
